import z from "zod";
import i18n from "@/i18n";

export const UpdateEmailSchema = () =>
  z.object({
    email: z
      .string()
      .email({
        message: i18n.t("Invalid email", { defaultValue: "Invalid email" }),
      })
      .min(1, {
        message: i18n.t("Email is required", {
          defaultValue: "Email is required",
        }),
      }),
    captcha: z.string().min(1, {
      message: i18n.t("Captcha is required", {
        defaultValue: "Captcha is required",
      }),
    }),
  });

export type UpdateEmailFormData = z.infer<ReturnType<typeof UpdateEmailSchema>>;
